<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/appmanager/d_WordLibrary.js此处编写
 -->
<template>
    <div>
        <view-grid :columns="columns"
                   :detail="detail"
                   :editFormFileds="editFormFileds"
                   :editFormOptions="editFormOptions"
                   :searchFormFileds="searchFormFileds"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/appmanager/d_WordLibrary.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'Id',
                    footer: "Foots",
                    cnName: '字词列表',
                    name: 'd_WordLibrary',
                    url: "/d_WordLibrary/",
                    sortName: "CreateDate"
                },
                extend: extend,
                editFormFileds: {"Id":"","Word":"","CharLibraryId":"","Index":"","WordSpell":"","Important":""},
                editFormOptions: [[{"title":"词编号","required":true,"field":"Id","disabled":true,"type":"text"},
                               {"title":"词","field":"Word","type":"text"},
                               {"title":"生字编号","field":"CharLibraryId","disabled":true,"type":"text"},
                               {"title":"生字索引","field":"Index","type":"number"},
                               {"title":"词拼音","field":"WordSpell","type":"text"},
                               {"dataKey":"enable","title":"是否重点词","field":"Important","type":"switch"}]],
                searchFormFileds: {"Word":"","CharLibraryId":""},
                searchFormOptions: [[{"title":"词","field":"Word","type":"text"},{"title":"生字编号","field":"CharLibraryId","type":"text"}]],
                columns: [{field:'Id',title:'词编号',type:'bigint',width:120,readonly:true,require:true,align:'left',sortable:true},
                       {field:'Word',title:'词',type:'string',width:120,align:'left'},
                       {field:'CharLibraryId',title:'生字编号',type:'bigint',width:120,readonly:true,align:'left'},
                       {field:'Index',title:'生字索引',type:'int',width:120,align:'left'},
                       {field:'WordSpell',title:'词拼音',type:'string',width:120,align:'left'},
                       {field:'WordStroke',title:'词笔画',type:'string',width:120,align:'left'},
                       {field:'Sound',title:'词的音频',type:'string',width:120,align:'left'},
                       {field:'Important',title:'是否重点词',type:'int',bind:{ key:'enable',data:[]},width:120,align:'left'},
                       {field:'CreateID',title:'CreateID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'Creator',title:'Creator',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateDate',title:'CreateDate',type:'datetime',width:120,hidden:true,align:'left',sortable:true},
                       {field:'ModifyID',title:'ModifyID',type:'int',width:120,hidden:true,align:'left'},
                       {field:'Modifier',title:'Modifier',type:'string',width:120,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'ModifyDate',type:'datetime',width:120,hidden:true,align:'left',sortable:true}],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
